<div xmlns:h="http://java.sun.com/jsf/html"
     xmlns:f="http://java.sun.com/jsf/core"
     xmlns:ui="http://java.sun.com/jsf/facelets"
     xmlns:c="http://java.sun.com/jstl/core"
     xmlns:a4j="http://richfaces.org/a4j"
     xmlns:nxd="http://nuxeo.org/nxweb/document"
     xmlns:nxh="http://nuxeo.org/nxweb/html"
     xmlns:nxu="http://nuxeo.org/nxweb/util">

  <!-- groups listing -->
  <a4j:outputPanel id="groupsListingPanel" layout="block">

    <nxu:set var="listingMode" value="#{nxu:test(groupManagementActions.listingMode == 'all', 'search_only', groupManagementActions.listingMode)}">
    <nxu:set var="contentViewName" value="groups_listing_#{listingMode}">
    <nxu:set var="useAjaxForm" value="true">
    <nxu:set var="useAjaxPagination" value="true">
      <ui:decorate template="/incl/content_view.xhtml">
        <ui:define name="content_view_header">
          <!-- create button -->
          <h:form rendered="#{groupManagementActions.allowCreateGroup and notReadOnly}"
            id="createGroupActionsForm">
            <div class="action_bar">
              <ul>
                <li class="selected">
                  <h:commandLink action="#{groupManagementActions.toggleShowCreateForm}"
                    immediate="true" id="createGroupButton">
                    <h:graphicImage value="/icons/action_add_group.png" styleClass="smallIcon" width="16px" height="16px"/>
                    <h:outputText value="#{messages['command.createGroup']}" />
                    <f:ajax execute="@this" render="groupsPanel" />
                  </h:commandLink>
                </li>
              </ul>
            </div>
          </h:form>
          <div style="clear:both" />

          <ui:insert name="groups_search_method" />
        </ui:define>
      </ui:decorate>
    </nxu:set>
    </nxu:set>
    </nxu:set>
    </nxu:set>

  </a4j:outputPanel>

</div>
